package com.dqyt.khjc.utils;

import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
import org.apache.poi.hssf.usermodel.HSSFPatriarch;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import sun.misc.BASE64Decoder;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class PoiTest {

    public static void main(String[] args) {
        FileOutputStream fileOut = null;
        BufferedImage bufferImg = null;
        //先把读进来的图片放到一个ByteArrayOutputStream中，以便产生ByteArray
        try {
            ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
            bufferImg = ImageIO.read(new File("F:/dede.png"));
            ImageIO.write(bufferImg, "jpg", byteArrayOut);

            HSSFWorkbook wb = new HSSFWorkbook();
            HSSFSheet sheet1 = wb.createSheet("test picture");
            //画图的顶级管理器，一个sheet只能获取一个（一定要注意这点）
            HSSFPatriarch patriarch = sheet1.createDrawingPatriarch();
            //anchor主要用于设置图片的属性
            HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 255, 255,(short) 1, 1, (short) 5, 8);
            anchor.setAnchorType(3);

            String myseal="iVBORw0KGgoAAAANSUhEUgAAAmwAAAEOCAYAAAA0QUvpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACnxSURBVHhe7d0HuGztVdDx2KVYUIoIiEBEiERAVGrokEgxSqQnSFNAiIAQ0AASkSLNgISiVOlRICaEpoL0CEhRimJvESkWsHfXL8+3dbPZM6fNd+89c/6/51nPnXPu9Nlz3rXX2x6RJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJ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2ztZbuhZWxcCdrtpeLlmJLc+QxdFi773fbn7XXEtnrqZ5MhTE5Zd+WruFlj8EcmVOJsOG/c5fqY8/8moiRJcjY0jBpM48LMDDV5QOXEEhkqcZY0ee6EZRp0hVlCwzg1OzboFtv7WcXjuybsSPBlEx824T7NtrVA6l4DnWxJ3l9qwsxii/nunTyo1KrYrn/n5MBSMUmSnD2NpQqI7jDJnNmmZoFa9kN3mMTOv7qxzBz1s+6pZVkQXWiSM7c/l8kbuT9U5Sw5c5nt44QZpdY5TJIkyT2kKvu+EybN6BbdS9SW0KX/hhNJkiS5x1R6JWLWWDNz9ND4yp+dsBB2kiRJ7gNd9fbK1UVqkszeEjWWGzFmMkmSJPeRSSs2fbcbx3oXD1U3E2RMcEmSJMkDwCxS67stC/laX9AabE10SZIkeYDoIjVT2czQl58oWUuSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJElyKo94xP8F1p96HC0Li64AAAAASUVORK5CYII=";

            BASE64Decoder decoder = new BASE64Decoder();
            byte[] decoderBytes = new byte[0];
            try {
                decoderBytes = decoder.decodeBuffer(myseal);
            } catch (IOException e) {
                e.printStackTrace();
            }

            //插入图片
            patriarch.createPicture(anchor, wb.addPicture(decoderBytes, HSSFWorkbook.PICTURE_TYPE_PNG));
            fileOut = new FileOutputStream("D:/测试Excel.xlsx");
            // 写入excel文件
            wb.write(fileOut);
            System.out.println("----Excle文件已生成------");
        } catch (Exception e) {
            e.printStackTrace();
        }finally{
            if(fileOut != null){
                try {
                    fileOut.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
